//
//  CigaretteSure.m
//  FloatClouds
//
//  Created by 黄威 on 16/9/6.
//  Copyright © 2016年 黄威. All rights reserved.
//

#import "CigaretteSure.h"

@implementation CigaretteSure

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        self.button = [BaseButton buttonWithType:UIButtonTypeCustom];
        [self addSubview:self.button];
        [self.button setTitle:@"确定" forState:UIControlStateNormal];
        [self.button addTarget:self action:@selector(click) forControlEvents:UIControlEventTouchUpInside];
        self.button.backgroundColor = [UIColor colorWithRed:18.0 / 255 green:86.0 / 255 blue:138.0 / 255 alpha:1];
        [self addSubview:self.button];

    }

    return self;

}


- (void)layoutSubviews{

    [super layoutSubviews];
    
    
    self.button.frame = CGRectMake(self.bounds.size.width * 0.2, 30, self.bounds.size.width * 0.6, self.bounds.size.height*0.6);


}

- (void)click{
    
    UIAlertView* alert = [[UIAlertView alloc]
                          initWithTitle:@"提示"
                          message:@"输入完毕"
                          delegate:nil
                          cancelButtonTitle:@"确定"
                          otherButtonTitles:nil];
    [alert show];
    
    [[NSNotificationCenter defaultCenter] postNotificationName:@"shouhui"
                                                        object:nil];
    
}

@end
